<%@ page language="java" import="java.util.*,cn.edu.nju.oraldefense.model.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%
	Dean instance = new Dean();
	instance =(Dean)session.getAttribute("dean");
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<link href="extjs/resources/css/ext-all.css" rel="stylesheet"
			type="text/css" />
		<script type="text/javascript" src="extjs/ext-base.js"></script>
		<script type="text/javascript" src="extjs/ext-all-debug.js"></script>
		<script type="text/javascript" src="extjs/ext-lang-zh_CN.js"></script>
		
		<script type="text/javascript">

			
			var assignTutorFn = function(){
				Ext.Ajax.request({
					url: "graduate/graduateAssignTutorAction",
					success:function(){
						Ext.MessageBox.alert("成功","分配成功");
					},
					failure:function(){
						Ext.MessageBox.alert("失败","分配失败");
					},
					method: "post"
				});
			};
			
			var assignTutorBtn = new Ext.Button({
				text:"分配导师",
				scale   : 'medium',
				handler:assignTutorFn
			});
			
			var assignDefenseFn = function(){
				Ext.Ajax.request({
					url: "defense/defenseAssignAction",
					success:function(){
						Ext.MessageBox.alert("成功","安排成功");
					},
					failure:function(){
						Ext.MessageBox.alert("失败","安排失败");
					},
					method: "post"
				});
			};
			
			var assignDefenseBtn = new Ext.Button({
				text:"安排答辩",
				scale   : 'medium',
				handler:assignDefenseFn
			});
			
			Ext.onReady(
				function(){
					assignTutorBtn.render(Ext.get("assignTutorDiv"));
					assignDefenseBtn.render(Ext.get("assignDefenseDiv"));
				}
			);
		</script>
	</head>
	<body>
	<div style="margin: 10 10;">
		<span id="assignTutorDiv">点击进行导师分配，分配将自动进行</span>
		<span id="assignDefenseDiv">点击进行论文答辩安排，安排将自动进行</span>
	</div>
	</body>
</html>
